# import the package and function
from wwo_hist import retrieve_hist_data
# https://github.com/ekapope/WorldWeatherOnline
# https://www.worldweatheronline.com/
# set working directory to store output csv file(s)
import os
os.chdir("/Users/digvijayghotane/Georgetown/ChristineFair/Climate")

FREQUENCY = 24
START_DATE = '01-JAN-2009'
END_DATE = '15-NOV-2019'
API_KEY = '#EnterAPIKeyHere'
# 'akhnur', 'anantnag', 'arnia', 'badgam', 'bandipur', 'baramula', 'batote', 'bhaderwah', 'bijbiara', 'bishna', 'doda', 'hajan', 'handwara', 'hiranagar', 'jammu', 'kargil', 'kathua', 'katra', 'khour', 'kishtwar', 'kulgam', 'magam', 'pahalgam', 'parole', 'pattan', 'pulwama', 'qazigund', 'rajauri', 'ramban', 'ramgarh', 'ramnagar', 'samba', 'shupiyan', 'sopur', 'srinagar', 'sumbal', 'tral', 'udhampur', 'uri', 'leh'

#Districts : 'anantnag', 'badgam', 'bandipur', 'baramula', 'doda', 'ganderbal', 'jammu', 'kargil', 'kathua', 'kishtwar', 'kulgam', 'kupwara', 'leh', 'poonch', 'pulwama', 'rajauri', 'ramban', 'samba', 'shupiyan', 'srinagar', 'udhampur'
#Missing Districts: 'reasi'

#kargil, kathua, leh, samba, udhampur

LOCATION_LIST = ['udhampur']

hist_weather_data = retrieve_hist_data(API_KEY,
                                LOCATION_LIST,
                                START_DATE,
                                END_DATE,
                                FREQUENCY,
                                location_label = False,
                                export_csv = True,
                                store_df = True)